jQuery.noConflict();

jQuery(document).ready( function($){
	//fix search box on mac system;
	var ops = window.navigator.userAgent;
    var ops = ops.split(";")[2];
    if(ops!=null){
	    var r = ops.match("Mac");
	    if(r){
	    	$(".header .nav_box .nav_bar ul li a.home ").css('padding', '0 0 0 21px');
	    	$(".header .nav_box .nav_bar ul li span").css('padding', '0 14px 0 0');
	    	$(".select1").css('padding', '7px 6px');
	    }
    }
	var ua = navigator.userAgent.toLowerCase();
	isOpera = ua.indexOf("opera") > -1;
	isIE9 = !isOpera && ua.indexOf("msie 9") > -1;
	if(isIE9){
	    $(".header .nav_box .nav_bar ul li a.home ").css('padding', '0 0 0 20px');
    	$(".header .nav_box .nav_bar ul li span").css('padding', '0 13px 0 0');
    	$(".select1").css('padding', '7px 6px');
    	$(".nav_search .input1").css('padding', '7px 5px 7px 7px');
	}
	
	/**** every input form, just add classname called TISHI-INPUT**/
	
    var temp_text = '';
	var text_a = new Array();
	for(i=0;i<30;i++)text_a[i] ='';
	var num_a = new Array();
	for(i=0;i<30;i++)num_a[i] =1;
	$('.tishi-input').focus(function(){
		 if(num_a[$(this).attr("tishinum")]==1){
			 text_a[$(this).attr("tishinum")] = $(this).val();
		     $(this).val('');
			num_a[$(this).attr("tishinum")] = num_a[$(this).attr("tishinum")]+1;
			
		     if($(this).val()== text_a[$(this).attr("tishinum")])$(this).val(''); 
		     }
		if($(this).val()== text_a[$(this).attr("tishinum")])$(this).val('');
	});
   $('.tishi-input').blur( function(){if($(this).val()=='')$(this).val( text_a[$(this).attr("tishinum")])});
   
   /****  Navigator - Sub Menu**/
   $('.nav_bar > ul > li').mouseover(function(){
			$(this).children('ul').show();
			$(this).children('ul').mouseout(function(){
				$(this).hide();
			});
			
    });
   /********  Home Page -- The Dome Newsletter *******/
   	$(".h_newletter_module_submit .su_button").hover(function (){
		  $(".h_newletter_module_submit .su_button input").attr("src",image_url+"h_newletter_sub_grey_bg.png");
	 },function (){
		  $(".h_newletter_module_submit .su_button input").attr("src",image_url+"h_newletter_sub_bg.png");
	 }	 
	 );		   
		
});